<?php
class FrontNews
{
	public function __construct()
	{
		
	}
	
	public function getNews()
	{
		DB::exec("SET NAMES 'utf8'");
		
		$sql = "SELECT news_id, news_title, news_desc_en, news_desc_sin, news_desc_tamil
				FROM tbl_news
				WHERE status = 1";
		
		$news_arr = DB::fetchAll($sql);
		
		return $news_arr;
	}
	
	public function getNewsById($news_id)
	{
		DB::exec("SET NAMES 'utf8'");
		
		$sql = "SELECT news_title, news_desc_en, news_desc_sin, news_desc_tamil
				FROM tbl_news
				WHERE news_id = " . $news_id . " 
				AND status = 1";
		
		$news_arr = DB::fetchAll($sql);
		
		return $news_arr;
	}
}
?>